﻿@{
    ViewBag.Title = "Recharge";
    Layout = "~/Views/Shared/_Member.cshtml";
}
@section head{
    <link type="text/css" href="/content/css/bank.css" rel="stylesheet" />
}
<div class="container" style="margin-top:20px;">
    <div class="headline">
        <h2>
            账号充值</h2>
    </div>
    <div class="tag-box tag-box-v3">
        <div class="row-fluid">
            <div class="span12" style="height: 46px; line-height: 46px; border-bottom: 1px solid #eee;">
                @{
                    RooHui.Infrastructure.Entities.Entity.Account account = ViewBag.Account;
                    }
                <h2>
                    账号余额： <span class="orange" style="font-size: 24px; font-weight: bold;">@account.BalanceAmount</span>
                    &nbsp;&nbsp;&nbsp;冻结余额： <span class="blue" style="font-size: 24px; font-weight: bold;">
                        @account.FrozenAmount</span>
                </h2>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12" style="margin-left: 0; height: 46px; line-height: 46px;">
                <div class="span12">
                    充值提示：</div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <ul>
                    <li>投资人充值过程全程免费，不收取任何手续费；</li>
                    <li>最低充值金额应大于等于 1 元；</li>
                    <li>请投资人根据发标计划合理充值，因积木盒子无法触及用户资金账户，无法收取用户任何费用，为防止套现，所充资金必须经投标回款后才能提现；</li>
                    <li>严禁利用充值功能进行信用卡套现、转账、洗钱等行为，一经发现，将封停账号30天；</li>
                    <li>充值期间，请勿关闭浏览器，待充值成功并返回首页后，所充资金才能入账，如有疑问，请联系客服；</li>
                    <li>充值需开通银行卡网上支付功能，如有疑问请咨询开户行客服；</li>
                    <li>支付限额请参照 支付说明。</li>
                </ul>
            </div>
        </div>
        <hr />
        @if (!String.IsNullOrEmpty(ViewBag.Message))
        {
        <div class="alert alert-error">@ViewBag.Message</div>
        }
        <form id="rechargefrom" method="post" action="/member/Recharge">
        <div class="row-fluid">
            <div class="span12" style="margin-left: 0; height: 46px; line-height: 46px;">
                <div class="span12">
                    选择银行：</div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <div class="tab-v2 fa-heading margin-bottom-40">
                    <ul class="nav nav-tabs" style="margin-bottom: 0;">
                        <li class="active"><a data-toggle="tab" href="#fa-icon-1">个人网银</a></li>
                    </ul>
                    <div class="tab-content">
                        <div class="row-fluid rechargeBankList">
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="ICBC" />
                                    <span class="rechargebank-ICBC"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="ABC" />
                                    <span class="rechargebank-ABC"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="BOC"/>
                                    <span class="rechargebank-BOC"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CCB" />
                                    <span class="rechargebank-CCB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="BOCOM" />
                                    <span class="rechargebank-BOCOM"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CITIC" />
                                    <span class="rechargebank-CITIC"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="GDB" />
                                    <span class="rechargebank-GDB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CMBC" />
                                    <span class="rechargebank-CMBC"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CMB" />
                                    <span class="rechargebank-CMB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="HXB" />
                                    <span class="rechargebank-HXB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CEB" />
                                    <span class="rechargebank-CEB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CIB" />
                                    <span class="rechargebank-CIB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="SPDB" />
                                    <span class="rechargebank-SPDB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="PSBC" />
                                    <span class="rechargebank-PSBC"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="BCCB" />
                                    <span class="rechargebank-BCCB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="BOS" />
                                    <span class="rechargebank-BOS"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="PINGAN" />
                                    <span class="rechargebank-PINGAN"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CBHB" />
                                    <span class="rechargebank-CBHB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="NJCB" />
                                    <span class="rechargebank-NJCB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="HZCB" />
                                    <span class="rechargebank-HZCB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="CZB" />
                                    <span class="rechargebank-CZB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="BJRCB" />
                                    <span class="rechargebank-BJRCB"></span>
                                </label>
                            </div>
                            <div class="span3">
                                <label class="radio">
                                    <input type="radio" name="BankID" value="SRCB" />
                                    <span class="rechargebank-SRCB"></span>
                                </label>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12">
                充值金额：
                <input type="text" id="txtamount" name="rechargeAmount" />
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <input type="submit" value="确认" class="btn btn-info" />
            </div>
        </div>
        </form>
    </div>
</div>
@section scripts{
    <script type="text/javascript">
        $('#rechargefrom').submit(function () {
            $('#ipterror').remove();
            if ($('input[name="BankID"]:checked').length == 0) {
                $(this).before($('<div id="ipterror" class="alert alert-error">请选择银行！</div>'));
                return false;
            }
            var amount = $('#txtamount').val();
            if (!/^(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d{1,2})?$/.test(amount) ||
                parseFloat(amount) <= 1) {
                $(this).before($('<div id="ipterror" class="alert alert-error">充值金额输入有误，请输入大于1的金额，最多保留两位小数！</div>'));
                return false;
            }
        });
    </script>
}